<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>增加用户的处理页面</title>
</head>
<body>

	<jsp:useBean id="db" class="com.DBManager" scope="page"></jsp:useBean>
	<%	
		request.setCharacterEncoding("utf-8");
		String uid=request.getParameter("uid");
		String password=request.getParameter("password");
		/* String password2=request.getParameter("password2"); */
		/* String qq=request.getParameter("qq");
		String WeChat=request.getParameter("WeChat");
		String departments=request.getParameter("departments");
		String profession=request.getParameter("profession");
		String name=request.getParameter("name");
		String classNum=request.getParameter("classNum"); */
		uid=uid.trim();/*左右空格不为空  */
		password=password.trim();
/* 		String sql="insert into user(uid,password,qq,WeChat,departments,profession,name,classNum) values('"+uid+"','"+password+"','"+qq+"','"+WeChat+"','"+departments+"','"+profession+"','"+name+"','"+classNum+"')";
 */		String sql="insert into user(uid,password) values('"+uid+"','"+password+"')";
		db.executeSql(sql);
		db.Release();
		out.println("注册成功!3秒后为您跳转到登录页面");
		response.setHeader("refresh", "3;url=login.jsp");
		
	%>
	
</body>
</html>